# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

# Initial PKGBUILD from AUR.
# Old Submitter: Gavin Lloyd <gavinhungry@gmail.com>
# Old Maintainer: Misaka13514 <Misaka13514 at gmail dot com>

pkgname=gqrx-scanner
pkgver=1.0.5
pkgrel=1
pkgdesc='A frequency scanner for Gqrx Software Defined Radio receiver.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-radio' 'blackarch-scanner')
url='https://github.com/neural75/gqrx-scanner'
license=('MIT')
depends=('glibc')
makedepends=('cmake')
optdepends=('gqrx: Software Defined Radio receiver')
source=("https://github.com/neural75/gqrx-scanner/archive/v$pkgver.tar.gz")
sha512sums=('028bc0161abca2419bae6a03da32251d4826b65dc0afcd6daa7483f3d7563251c8fbe18f00b7a3f9adcc16745bad1b825f2afffe6f8aefa9acb1b47bdd9e7c4e')

build() {
  cmake -B build -S "${pkgname}-${pkgver}" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  install -Dm 644 "$pkgname-$pkgver/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

